<template>
  <div>
    <h2>子组件</h2>

    <el-button type="primary" @click="handleClick">给父组件值Msg</el-button>
  </div>
</template>
<script setup lang="ts">
const childMsg = ref('我是子组件的消息')

const emits = defineEmits(['sendMsg'])

const handleClick = () => {
  emits('sendMsg', childMsg)
}
</script>
<style scoped></style>
